<!--
Copyright 2016 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at
      http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
-->

{{define "historianv2"}}
<div class="sdk-version-21">
  <div class="historian-v2 settings">
    <span class="settings-section">
      <!-- Class instead of ID as this template is included twice in comparison view. -->
      <select class='configure-metrics'></select>
    </span>
    <span class="settings-section">
      <label>Show bars<input class="show-bars" type="checkbox" checked></label>
    </span>
    <span class="settings-section settings-right">
      <select class="line-overlay-metrics"></select>
    </span>
    <span class="settings-section settings-right">
      <label>Show rate of change<input class="show-rate-of-change" type="checkbox"></label>
    </span>
    <span class="settings-section center">
     <label>Restrict domain<select class="set-domain"></select></label>
    </span>
    <span class="settings-section">
      <label>Regexp search<input name="regexp-search" type="text"></label>
    </span>
    <button type="button" class="btn btn-default btn-sm settings-button">
      <span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
      <div class="settings-overflow">
         <a href="#" class="show-level-summary">
           <span class="glyphicon glyphicon-ok glyphicon-inline-left settings-checkbox"></span>
           <span>Show level summaries</span>
         </a>
         <a href="#" class="filter-unimportant" title="Filter out events considered insignificant, such as locks with short duration.">
           <span class="glyphicon glyphicon-ok glyphicon-inline-left settings-checkbox"></span>
           <span>Filter unimportant</span>
         </a>
      </div>
    </button>
  </div>
  <div class="graph"></div>
  <!-- The graph div is cleared and redrawn on several occasions, so put the default
       SVG contents in a separate div that can be copied into the graph div. -->
  <div class="svg-content" style="display:none;">
    <svg>
      <!-- Diagonal hatching pattern for rendering unavailable log times in the graph. -->
      <pattern id="diagonal-hatch"
               width="10"
               height="10"
               patternTransform="rotate(45 0 0)"
               patternUnits="userSpaceOnUse">
        <line x1="0" y1="0" x2="0" y2="10" style="stroke: LightGray; stroke-width: 8" />
      </pattern>
    </svg>
  </div>
</div>
{{end}}

{{define "overflow_message"}}
<div id="dialog-message" data-toggle="tooltip" title="Overflow detected">
  Battery history log overflow has been detected in the bugreport.
  Please note the visual timeline does not show events after the overflow.
</div>
{{end}}
